package com.bjpowernode.servlets;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class SomeServlet extends HttpServlet {
	protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		
		// 向请求中放入属性
		request.setAttribute("company", "北京动力节点");
		request.setAttribute("address", "北京大兴");
		
		// 从请求中删除指定域属性
		request.removeAttribute("address");
		
		// 将请求转发给OtherServlet
		request.getRequestDispatcher("/otherServlet").forward(request, response);
	}

}
